#-------------------------------------------------
# Created on 2018/11/11
#-------------------------------------------------

#By default QT contains core and gui modules, if gui is not needed, remove it.
QT += core gui widgets

TARGET = MainFrame

#If runnable, this should be app.
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

include(../global.pri)

INCLUDEPATH += \
    ./Include \
    ./../RIVIAEntity/Include \
    ./../RIVIACommon/Include \
    ./../RIVIAFileIO/Include \
    ./../RIVIAResource/Include \
    ./../RIVIAImgProc/Include \

#链接库：-L指定目录，-l指定库的名称（无需后缀，.lib，.a, .so都适用）
unix{
    CONFIG(debug, debug|release){
        contains(QT_ARCH, x86_64){
            LIBS += -L$$PWD/../../build/bin/X64/Debug \
                    -lRIVIACommon_L64d \
                    -lRIVIAFileIO_L64d \
                    -lRIVIAEntity_L64d \
                    -lRIVIAResource_L64d \
                    -lRIVIAImgProc_L64d \
        } else {
            LIBS += -L$$PWD/../../build/bin/X86/Debug \
                    -lRIVIACommon_L32d \
                    -lRIVIAFileIO_L32d \
                    -lRIVIAEntity_L32d \
                    -lRIVIAResource_L32d \
                    -lRIVIAImgProc_L32d \
        }
    }

    CONFIG(release, debug|release){
        contains(QT_ARCH, x86_64){
            LIBS += -L$$PWD/../../build/bin/X64/Release \
                    -lRIVIACommon_L64 \
                    -lRIVIAFileIO_L64 \
                    -lRIVIAEntity_L64 \
                    -lRIVIAResource_L64 \
                    -lRIVIAImgProc_L64 \
        } else {
            LIBS += -L$$PWD/../../build/bin/X86/Release \
                    -lRIVIACommon_L32 \
                    -lRIVIAFileIO_L32 \
                    -lRIVIAEntity_L32 \
                    -lRIVIAResource_L32 \
                    -lRIVIAImgProc_L32 \
        }
    }
}
win32{
    CONFIG(debug, debug|release){
        contains(QT_ARCH, x86_64){
            LIBS += -L$$PWD/../../build/bin/X64/Debug \
                    -lRIVIACommon_W64d \
                    -lRIVIAFileIO_W64d \
                    -lRIVIAEntity_W64d \
                    -lRIVIAResource_W64d \
                    -lRIVIAImgProc_W64d \
        } else {
            LIBS += -L$$PWD/../../build/bin/X86/Debug \
                    -lRIVIACommon_W32d \
                    -lRIVIAFileIO_W32d \
                    -lRIVIAEntity_W32d \
                    -lRIVIAResource_W32d \
                    -lRIVIAImgProc_W32d \
        }
    }

    CONFIG(release, debug|release){
        contains(QT_ARCH, x86_64){
            LIBS += -L$$PWD/../../build/bin/X64/Release \
                    -lRIVIACommon_W64 \
                    -lRIVIAFileIO_W64 \
                    -lRIVIAEntity_W64 \
                    -lRIVIAResource_W64 \
                    -lRIVIAImgProc_W64 \
        } else {
            LIBS += -L$$PWD/../../build/bin/X86/Release \
                    -lRIVIACommon_W32 \
                    -lRIVIAFileIO_W32 \
                    -lRIVIAEntity_W32 \
                    -lRIVIAResource_W32 \
                    -lRIVIAImgProc_W32 \
        }
    }
}

SOURCES += \
    Src/main.cpp \
    Src/MainFrame/RIVIAMainFrame.cpp \
    Src/MainFrame/CentralWidget/CentralWidget.cpp \
    Src/MainFrame/MenuBar/MenuBar.cpp \
    Src/MainFrame/StatusBar/StatusBar.cpp \
    Src/MainFrame/ToolBar/ToolBarBase.cpp \
    Src/MainFrame/CentralWidget/CentralManager.cpp \
    Src/MainFrame/MenuBar/MenuListBase.cpp \
    Src/MainFrame/MenuBar/FileMenuList.cpp \
    Src/MainFrame/MenuBar/EditMenuList.cpp \
    Src/MainFrame/MenuBar/ImageMenuList.cpp \
    Src/MainFrame/MenuBar/FiltersMenuList.cpp \
    Src/MainFrame/MenuBar/ColorsMenuList.cpp \
    Src/MainFrame/MenuBar/HelpMenuList.cpp \
    Src/MainFrame/ToolBar/Tools.cpp \
    Src/MainFrame/SettingDock/ToolOptionsDock.cpp \
    Src/MainFrame/SettingDock/BrushesDock.cpp \
    Src/MainFrame/SettingDock/LayersDock.cpp \
    Src/MainFrame/SettingDock/ChannelsDock.cpp \
    Src/MainFrame/CentralWidget/ImageTabWidget.cpp \
    Src/MainFrame/CentralWidget/ImageViewArea.cpp \
    Src/MainFrame/CentralWidget/ImageViewWidget.cpp \
    Src/UI/FlowLayout.cpp \
    Src/MainFrame/MenuBar/Dialogs/BlurDialog.cpp \
    Src/MainFrame/MenuBar/Dialogs/BrightnessContrastDialog.cpp \
    Src/MainFrame/SettingDock/PaletteDock.cpp \
    Src/MainFrame/SettingDock/PaletteDock/PaletteLabel.cpp \
    Src/MainFrame/SettingDock/LayersDock/LayerDockWidget.cpp

HEADERS += \
    Include/MainFrame/RIVIAMainFrame.h \
    Include/MainFrame/CentralWidget/CentralWidget.h \
    Include/MainFrame/MenuBar/MenuBar.h \
    Include/MainFrame/StatusBar/StatusBar.h \
    Include/MainFrame/ToolBar/ToolBarBase.h \
    Include/MainFrame/CentralWidget/CentralManager.h \
    Include/MainFrame/MenuBar/MenuListBase.h \
    Include/MainFrame/MenuBar/FileMenuList.h \
    Include/MainFrame/MenuBar/EditMenuList.h \
    Include/MainFrame/MenuBar/ImageMenuList.h \
    Include/MainFrame/MenuBar/FiltersMenuList.h \
    Include/MainFrame/MenuBar/ColorsMenuList.h \
    Include/MainFrame/MenuBar/HelpMenuList.h \
    Include/MainFrame/ToolBar/Tools.h \
    Include/MainFrame/SettingDock/ToolOptionsDock.h \
    Include/MainFrame/SettingDock/BrushesDock.h \
    Include/MainFrame/SettingDock/LayersDock.h \
    Include/MainFrame/SettingDock/ChannelsDock.h \
    Include/MainFrame/CentralWidget/ImageTabWidget.h \
    Include/MainFrame/CentralWidget/ImageViewArea.h \
    Include/MainFrame/CentralWidget/ImageViewWidget.h \
    Include/UI/FlowLayout.h \
    Include/MainFrame/MenuBar/Dialogs/BlurDialog.h \
    Include/MainFrame/MenuBar/Dialogs/BrightnessContrastDialog.h \
    Include/MainFrame/SettingDock/PaletteDock.h \
    Include/MainFrame/SettingDock/PaletteDock/PaletteLabel.h \
    Include/MainFrame/SettingDock/LayersDock/LayerDockWidget.h

unix {
    target.path = /usr/local/lib64
    INSTALLS += target
}

RESOURCES += \
    ../../Resource/UIRes.qrc

TRANSLATIONS +=  \
    ../../Resource/qm/RIVIA_zh.ts \
    ../../Resource/qm/RIVIA_en.ts

DISTFILES +=
